import Ajax from "@/assets/js/common/ajax";


//添加商品
export const insertAdminGoodsAdd=(params,success,fail)=>{
    Ajax(`/admin/goods/add`,params,success,fail,"POST");
};
  


//删除商品
export const deleteAdminGoodsDelete=(params,success,fail)=>{
    Ajax(`/admin/goods/delete`,params,success,fail,"GET");
};

//商品详情
export const getAdminGoodsDetail=(params,success,fail)=>{
    Ajax(`/admin/goods/detail`,params,success,fail,"GET");
};




//商品分页查询
export const getAdminGoodsList=(params,success,fail)=>{
    Ajax(`/admin/goods/list`,params,success,fail,"POST");
};


//商品下线商品
export const updataAdminGoodsOffline=(params,success,fail)=>{
    Ajax(`/admin/goods/offline`,params,success,fail,"GET");
};

//商品发布
export const updataAdminGoodsOnline=(params,success,fail)=>{
    Ajax(`/admin/goods/online`,params,success,fail,"GET");
};

 //修改密码
export const updataAdminGoodsUpdate=(params,success,fail)=>{ 
    Ajax(`/admin/goods/update`,params,success,fail,"GET");
}


//导入导出商品
export const query=(params,success,fail)=>{
    Ajax(`/dolphin-auth/management/oauth/logout`,params,success,fail,"GET");
}

export const download=(params,success,fail)=>{
    Ajax(`/dolphin-auth/management/oauth/current/user/${params.id}`, {responseType: "blob"},success,fail,"GET");
}

